<template>
  <div class="wrapper">
    <checking-article-list :articles=articles class="draft-article-list"
    @fetchArticleAbstracts="fetchArticleAbstracts"></checking-article-list>
  </div>
</template>

<script>
import CheckingArticleList from '@/components/CheckingArticleList.vue';

  export default {
    components: {
      CheckingArticleList,
    },
    data() {
      return {
        articles: []
      }
    },
    methods: {
      fetchArticleAbstracts() {
        this.$fetch({
          name: 'article checking',
          url: 'creator/manage/article/checking',
          method: 'GET'
        }).then(res => {
          if(res.data.success) {
            this.articles = res.data.object;
          } else {
            this.$alert({
              type: 'error',
              content: '获取审核文章失败'
            })
          }
        }).catch(error => {
          this.$alert({
            type: 'error',
            content: '获取审核文章失败'
          })
        })
      }
    },
  }
</script>

<style lang="less" scoped>
</style>